// // 引入第一个JS文件
// //document.write('<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>');
// document.write('<script src="/static/js/vue.min.js"></script>');
// // 引入第二个JS文件
// // document.write('<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>');
// document.write('<script src="/static/js/axios.min.js"></script>');
// // 引入第三个JS文件
// document.write('<script src="/static/js/global_var.js"></script>');

window.addEventListener("DOMContentLoaded", function() {
    const scriptList = [
        "/static/js/vue.min.js",
        "/static/js/axios.min.js",
        "/static/js/global_var.js"
    ]
    scriptList.forEach(item => {
        const scriptEl = document.createElement('script')
        scriptEl.src = item
        document.body.appendChild(scriptEl)
    })
})

window.addEventListener("load", function(){

    axios.defaults.headers.common['Authorization'] = localStorage.getItem("global_token");
})
